﻿@page
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.Account.Localization
@using Volo.Abp.Account.Settings
@using Volo.Abp.Settings
@model mozhi.smarterp.AuthorCenter.Pages.Account.LoginModel
@inject IHtmlLocalizer<AccountResource> L
@inject Volo.Abp.Settings.ISettingProvider SettingProvider
@{
    Layout = null;
}
<html lang="zh-Hans" dir="">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title>安全登录</title>
    <link rel="stylesheet" href="/libs/abp/core/abp.css?_v=638647506498051487">
    <link rel="stylesheet" href="/libs/bootstrap/css/bootstrap.css?_v=638647506498590060">
    <link rel="stylesheet" href="/libs/toastr/toastr.min.css?_v=638647506503102348">
    <link rel="stylesheet" href="/libs/select2/css/select2.min.css?_v=638647506500891860">
    <link rel="stylesheet" href="/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css?_v=638647506500851958">
    <link rel="stylesheet" href="/libs/datatables.net-bs4/css/dataTables.bootstrap4.css?_v=638647506498864373">
    <link rel="stylesheet" href="/libs/bootstrap-datepicker/bootstrap-datepicker.min.css?_v=638647506498101354">
    <link rel="stylesheet" href="/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-styles.css?_v=637424965620000000">
    <link rel="stylesheet" href="/themes/basic/layout.css?_v=637424966500000000">
    <script src="/libs/abp/utils/abp-utils.umd.min.js?_v=638647506498081400"></script>
    <script src="/libs/abp/core/abp.js?_v=638647506498051487"></script>
    <script src="/libs/jquery/jquery.js?_v=638647506500692370"></script>
    <script src="/libs/abp/jquery/abp.jquery.js?_v=638647506498061468"></script>
    <script src="/libs/bootstrap/js/bootstrap.bundle.js?_v=638647506498754961"></script>
    <script src="/libs/lodash/lodash.min.js?_v=638647506500712323"></script>
    <script src="/libs/jquery-validation/jquery.validate.js?_v=638647506498964102"></script>
    <script src="/libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js?_v=638647506498954134"></script>
    <script src="/libs/jquery-form/jquery.form.min.js?_v=638647506498934185"></script>
    <script src="/libs/select2/js/select2.min.js?_v=638647506501625952"></script>
    <script src="/libs/select2/js/select2-bootstrap-modal-patch.js?_v=638647506501596051"></script>
    <script src="/libs/datatables.net/js/jquery.dataTables.js?_v=638647506498924209"></script>
    <script src="/libs/datatables.net-bs4/js/dataTables.bootstrap4.js?_v=638647506498874343"></script>
    <script src="/libs/sweetalert/sweetalert.min.js?_v=638647506501635931"></script>
    <script src="/libs/toastr/toastr.min.js?_v=638647506503112322"></script>
    <script src="/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js?_v=638647506500841990"></script>
    <script src="/libs/luxon/luxon.min.js?_v=638647506500812050"></script>
    <script src="/libs/abp/luxon/abp.luxon.js?_v=638647506498061468"></script>
    <script src="/libs/timeago/jquery.timeago.js?_v=638647506501645899"></script>
    <script src="/libs/bootstrap-datepicker/bootstrap-datepicker.min.js?_v=638647506498111324"></script>
    <script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/ui-extensions.js?_v=637424965620000000"></script>
    <script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/jquery/jquery-extensions.js?_v=637424965620000000"></script>
    <script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/jquery-form/jquery-form-extensions.js?_v=637424965620000000"></script>
    <script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/jquery/widget-manager.js?_v=637424965620000000"></script>
    <script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js?_v=637424965620000000"></script>
    <script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js?_v=637424965620000000"></script>
    <script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js?_v=637424965620000000"></script>
    <script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert/abp-sweetalert.js?_v=637424965620000000"></script>
    <script src="/libs/abp/aspnetcore-mvc-ui-theme-shared/toastr/abp-toastr.js?_v=637424965620000000"></script>
    <script src="/Pages/Abp/MultiTenancy/tenant-switch.js?_v=637424965840000000"></script>
    <script src="/themes/basic/layout.js?_v=637424966500000000"></script>
    <script src="/libs/jquery-validation/localization/messages_zh.js?_v=638647506500592656"></script>
    <script src="/libs/timeago/locales/jquery.timeago.zh-CN.js?_v=638647506503092374"></script>
    <script src="/libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js?_v=638647506498400546"></script>
    <style type="text/css">
        .login-container {
            margin: auto;
            width: 60%;
            height: 90%;
            padding: 10px;
        }

        .login-container-logo {
            float: left;
            width: 60%;
            position: relative;
            top: 100px;
            min-height: 55%;
        }

        .login-container-form {
            position: relative;
            top: 150px;
            min-height: 55%;
            width: 38%;
            border: 1px solid #dee2e6;
            border-radius: 10px;
            float: left
        }

        .form-group {
            margin-bottom: 1rem;
            padding: 0px 10px 0px 10px
        }

        .btn-login {
            width: 240px;
            color: #fff;
            background-color: #007bff;
            border-color: #007bff;
            box-shadow: none !important;
            border: none;
        }
    </style>
</head>
<body class="abp-application-layout bg-light ">
    <div class="login-container">
        <div class="login-container-logo">
            <img src="~/assets/images/logo.png" style="width:80%" />
        </div>
        <div class="card-body p-5 login-container-form">
            <h4>安全登录</h4>
            @if (await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled))
            {
                @* <strong>
            @L["AreYouANewUser"]
            <a href="@Url.Page("./Register", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})" class="text-decoration-none">@L["Register"]</a>
            </strong> *@
            }
            @if (Model.EnableLocalLogin)
            {
                <form method="post" class="mt-4">
                    <input asp-for="ReturnUrl" />
                    <input asp-for="ReturnUrlHash" />
                    <div class="form-group">
                        <label>账号</label>
                        <input asp-for="LoginInput.UserNameOrEmailAddress" class="form-control" />
                        <span asp-validation-for="LoginInput.UserNameOrEmailAddress" class="text-danger"></span>
                    </div>
                    <div class="form-group">
                        <label>密码</label>
                        <input asp-for="LoginInput.Password" class="form-control" />
                        <span asp-validation-for="LoginInput.Password" class="text-danger"></span>
                    </div>
                    <abp-row style="display:none">
                        <abp-column>
                            <abp-input asp-for="LoginInput.RememberMe" class="mb-4" />
                        </abp-column>
                        <abp-column class="text-right">
                            <a href="@Url.Page("./ForgotPassword", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})">@L["ForgotPassword"]</a>
                        </abp-column>
                    </abp-row>
                    <div class="form-group">
                        <abp-button type="submit" button-type="Primary" name="Action" value="Login" class="btn-login">登录</abp-button>
                    </div>
                    @if (Model.ShowCancelButton)
                    {
                        <abp-button type="submit" button-type="Secondary" formnovalidate="formnovalidate" name="Action" value="Cancel" class="btn-block btn-lg mt-3">@L["Cancel"]</abp-button>
                    }
                </form>
            }

            @if (Model.VisibleExternalProviders.Any())
            {
                <div class="mt-2">
                    <h5>@L["OrLoginWith"]</h5>
                    <form asp-page="./Login" asp-page-handler="ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" asp-route-returnUrlHash="@Model.ReturnUrlHash" method="post">
                        <input asp-for="ReturnUrl" />
                        <input asp-for="ReturnUrlHash" />
                        @foreach (var provider in Model.VisibleExternalProviders)
                        {
                            <button type="submit" class="btn btn-primary m-1" name="provider" value="@provider.AuthenticationScheme" title="@L["GivenTenantIsNotAvailable", provider.DisplayName]">@provider.DisplayName</button>
                        }
                    </form>
                </div>
            }

            @if (!Model.EnableLocalLogin && !Model.VisibleExternalProviders.Any())
            {
                <div class="alert alert-warning">
                    <strong>@L["InvalidLoginRequest"]</strong>
                    @L["ThereAreNoLoginSchemesConfiguredForThisClient"]
                </div>
            }

        </div>
    </div>
    <div style="text-align:center">
        Copyright © 2004-2024  墨汁软件 版权所有
    </div>
</body>
</html>
